﻿@model IEnumerable<AP.Framework.Infrastructure.Entities.cms_Product>
@using AP.Framework.Infrastructure.Repositories
@using AP.Framework.Infrastructure.Database
@{
    ApContext context = new ApContext();
    ProductCategoryRepository productCategory = new ProductCategoryRepository(context);
    var productCategoryList = productCategory.GetAll().OrderBy(p => p.Sequence).ToList();
}
@{
    ViewBag.Title = "产品展示";
    Layout = "~/Views/Shared/_Web960Layout.cshtml";
}
<div class="grid_5">
    <div class="index-sider">
        <div class="section-wrap index-news">
            <div class="section-title section-mark">
                <em style="color: #1EA4E3">产品列表</em></div>
            <div class="section-content">
                <ul class="links-list">
                    @{
                        foreach (var list in productCategoryList)
                        {                   
                        <li><a href="@Url.Action("Index", "Product", new { area = "", productCategoryId = list.ID })" class="title">@list.Name</a>
                            <span class="time">&gt;&gt;</span></li>
                        }                    
                    }
                </ul>
            </div>
        </div>
        @Html.Partial("_ContactPartial")
    </div>
</div>
<!-- end .grid_1 -->
<div class="grid_11">
    <div class="index-main">
        <div class="section-wrap index-service">
            <div class="section-title section-mark clearfix">
                <em style="color: #1EA4E3">产品展示</em>
            </div>
            <div class="section-content">
                <div id="product-list">
                    <div id="plug0">
                        @{
                            foreach (var pro in Model)
                            {                                             
                            <dl style="width: 140px; height: 170px;" class="column">
                                <dt><a href="@Url.Action("ViewDetails", "Product", new { area = "", productId = pro.ID })">
                                    <img src="@pro.Photo"  alt=""  width="132" height="108">
                                </a></dt>
                                <dd>
                                    <ul>
                                        <li>
                                            <h4 class="title">
                                                <a href="@Url.Action("ViewDetails", "Product", new { area = "", productId = pro.ID })">@pro.Name</a></h4>
                                        </li>
                                    </ul>
                                </dd>
                            </dl>     
                            }                  
                        }
                    </div>
                    <div style="clear: both;">
                    </div>
                </div>
                <br />
            </div>
        </div>
    </div>
</div>
<!-- end .grid_15 -->
<div class="clear">
</div>
